package com.tg.paw.pms.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tg.paw.common.entity.BaseEntity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * <p>
 * 商品规格SKU
 * </p>
 *
 * @author Rubble
 * @since 2020-08-05
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("pms_goods_sku")
@ApiModel(value="GoodsSku对象", description="商品规格SKU")
public class GoodsSku extends BaseEntity {


    @ApiModelProperty(value = "主键")
    @TableId(value = "sku_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long skuId;

    @ApiModelProperty(value = "平台商品编码sku")
    @TableField("sku_no")
    private String skuNo;

    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long goodsId;

    @ApiModelProperty(value = "平台货品编码spu")
    @TableField("goods_no")
    private String goodsNo;

    @ApiModelProperty(value = "店铺id")
    @TableField("store_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long storeId;

    @ApiModelProperty(value = "商家编码/条码")
    @TableField("merch_spec_code")
    private String merchSpecCode;

    @ApiModelProperty(value = "主图")
    @TableField("main_pic")
    private String mainPic;

    @ApiModelProperty(value = "画册图片")
    @TableField("album_pics")
    private String albumPics;

    @ApiModelProperty(value = "市场价")
    @TableField("mark_price")
    private BigDecimal markPrice;

    @ApiModelProperty(value = "销售价格")
    @TableField("sale_price")
    private BigDecimal salePrice;

    @ApiModelProperty(value = "销售属性1")
    @TableField("sale_attr1")
    private String saleAttr1;

    @ApiModelProperty(value = "销售属性2")
    @TableField("sale_attr2")
    private String saleAttr2;

    @ApiModelProperty(value = "库存")
    @TableField("inventory")
    private Integer inventory;

    @ApiModelProperty(value = "锁定库存")
    @TableField("lock_num")
    private Integer lockNum;

    @ApiModelProperty(value = "促销状态 0 否 1 是")
    @TableField("promotion_state")
    private Integer promotionState;

    @ApiModelProperty(value = "促销活动")
    @TableField("promotion_name")
    private String promotionName;

    @ApiModelProperty(value = "促销价格")
    @TableField("promotion_price")
    private BigDecimal promotionPrice;

    @ApiModelProperty(value = "促销开始时间")
    @TableField("promotion_start_time")
    private Date promotionStartTime;

    @ApiModelProperty(value = "促销结束时间")
    @TableField("promotion_end_time")
    private Date promotionEndTime;

    @ApiModelProperty(value = "逻辑删除: 0 正常 1 删除")
    @TableField("delete_status")
    @TableLogic
    private Integer deleteStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "修改者")
    @TableField(value = "modifier", fill = FieldFill.UPDATE)
    private String modifier;


}
